/* 牛牛主页面js */
function drinkSetting(){
	console.log("点击了喝水模式");
	$("#drink_setting").css("display","block");
}
layui.use([ 'jquery', 'layer', 'form'],function() {
	var $ = layui.$, form = layui.form, layer = layui.layer;
	form.on('radio(OnlyPoint)', function(data) {
		var dataVel = data.value == "1";
		if(dataVel){
			$("#drink_setting").show()
		}else{
			$("#drink_setting").hide()
		}
	})

    /*form.on('radio(game_type)', function (data) {
    	var dataVel = data.value
        if (dataVel == '1') {//牛牛
            $("#powersSizebtn").hide();
            $("#powersbtn").show();
        } else if (dataVel == '2') {//百家乐

        } else if (dataVel == '3') {//大小单双和
            $("#powersSizebtn").show();
            $("#powersbtn").hide();
        } else {//特码

        }
    });*/
    form.on('radio(game_type)', function (data) {
        var dataVel = data.value
        if (dataVel == '1') {//牛牛
            $("#powersSizebtn").hide();
            $("#powersbtn").show();
            $("#orientationbtn").hide();
        } else if (dataVel == '2') {//百家乐
            $("#powersSizebtn").hide();
            $("#powersbtn").hide();
            $("#baccaratbtn").show();
        } else if (dataVel == '3') {//大小单双和
            $("#powersSizebtn").show();
            $("#powersbtn").hide();
            $("#baccaratbtn").hide();
        } else {//特码

        }
    });
    form.on('input(tema)', function (data) {
        var dataVel = data.value
        console.log(dataVel);
        $(".orientation").val(dataVel);
    });

})

window.onload = function () {
    console.log("开始");
    var data = {};
    data.userName = "测试名称";
    data.password = "123456";
    data.phone = "12345678901";
    data.playerToken = "abae2bf4fc864";
    data.phoneNumber = "1234561234523446";
    data.phoneType = "windows";
    data = JSON.stringify(data);
    console.log(data);
    $.ajax({
        url:'/api/authorization',
        type:'POST',
        dataType: 'json',
        data: data,
        contentType:'application/json;charset=UTF-8',
        success: function(res) {
            console.log(res);
        }
    })
}
//c1bbf26db19abf2a31c486265ef5ba2d
$()


function a() {
    var dataVel = $("#tema").val();
    console.log(dataVel);
    $(".orientation").val(dataVel);
}